using UnityEngine;
using Module;
using InterfaceForGame;

public class Click : MonoBehaviour {
    InterfaceForUser userAction;
    RoleModule role = null;
    BoatModule boat = null;
    public void SetRole(RoleModule role) {

        this.role = role;
    }
    public void SetBoat(BoatModule boat) {
        this.boat = boat;
    }
    void Start() {
        userAction = GameDirector.GetInstance().sceneAction as InterfaceForUser;
    }
    void OnMouseDown() {

        if (boat == null && role == null) return;

        if (boat != null) userAction.MoveBoat();

        else if (role != null) userAction.MoveRole(role);
        
    }
}
